﻿Imports System.Windows.Forms

Public Class frmQueryEditorVarStrings
    Private strVarName As String = ""

    Public Function ShowMe(ByRef strVariavel As String, ByVal strDefValue As String) As String
        strVarName = strVariavel
        txtNewValue.Text = strDefValue
        txtNewValue.Select()
        Me.Text = "Variável: " & strVarName
        Me.ShowDialog()
        Return txtNewValue.Text
    End Function

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click

        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        txtNewValue.Text = strVarName
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

End Class
